package com.ailot.cloud.auth.controller;

import com.ailot.cloud.base.security.utils.SecurityUtil;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author token
 */
@RestController
@AllArgsConstructor
@RequestMapping("/token")
public class TokenController {

    /**
     * 退出token
     */
    @DeleteMapping("/logout")
    public String logout(HttpServletRequest request) {
        SecurityUtil.logout(request);
        return "退出成功";
    }

}
